<template>
  <div>
    <h1>App中的Count****{{count}}</h1>
    <h2>{{list}}</h2>
    
    <hr>
    <Header  @count='getCount' @list='getItem' />
    <hr>
    <List />
  </div>
</template>

<script>
import Header from './components/Header.vue'
import List from './components/List.vue'

export default {
  name:'App',
  components:{
    Header,
    List,
  },
  data(){
    return {
      count:0,
      list:[]
    }
  },
  methods:{
    getCount(count){
      this.count = count
    },
    getItem(item){
      this.list.push(item)
    }
  }
}
</script>

<style>

</style>